<template>
	<section>
		<!--start  面包屑-->
		<div class="location">
			<el-breadcrumb separator="/">
				<el-breadcrumb-item :to="{path:'/index'}">首页</el-breadcrumb-item>
				<el-breadcrumb-item :to="{path:'/order'}">订单</el-breadcrumb-item>
				<el-breadcrumb-item :to="{path:'/order'}">订单列表</el-breadcrumb-item>
				<el-breadcrumb-item>新增订货单</el-breadcrumb-item>
			</el-breadcrumb>
			<help-components>
				<span slot="headText">{{helpData.templateName}}</span>
				<p slot="headDescText" v-html="helpData.templateRemark"></p>
				<div slot="helpContentWrap">
					<div v-for="(item,index) in helpData.questionAndAnswerArray">
						<h3>{{item.templateContent}}</h3>
						<p v-html="item.templateRemark"></p>
					</div>
				</div>
			</help-components>
		</div>
		<!--end  面包屑-->
		<div ref="order" class="order" id="order" :class="{orderOverflow:modifyFromShow||addNewAddressShow||modifyAddressListShow||commonBillListShow||addCommonBillFormShow||modifyCommonBillFormShow||incrementBillListShow||addIncrementBillFormShow||modifyIncrementBillFormShow}">
			<!--修改收货地址(form表单)   start-->
			<div class="add-new-address">
				<transition name="fade">
					<div class="modal-backdrop" v-show="modifyFromShow"></div>
				</transition>
				<transition name="slideDown">
					<div class="add-address-con" v-show="modifyFromShow" :style="{top:top}">
						<div class="add-header-top">
							<span class="add-header-title">修改收货地址</span>
						</div>
						<div class="add-header-body">
							<el-form :model="newFormData" :rules="deliveryrules"  ref="modifyForm" label-width="80px">
								<el-form-item label="客户名称" prop="memberName">
									<el-input v-model="newFormData.memberName" disabled></el-input>
								</el-form-item>
								<el-form-item label="手机" prop="deliveryPhone">
									<el-input v-model="newFormData.deliveryPhone"></el-input>
								</el-form-item>
								<el-form-item label="收货人" prop="deliveryContact">
									<el-input v-model="newFormData.deliveryContact"></el-input>
								</el-form-item>
								<el-form-item label="电话" prop="">
									<el-input v-model="newFormData.deliveryTel"></el-input>
								</el-form-item>
								<el-form-item label="区域" prop="detailedArea">
									<el-cascader style="width: 405px" opper-class="kael" :options="detailedAreaList" v-model="newFormData.detailedArea" :props="areaProps">
									</el-cascader>
								</el-form-item>
								<el-form-item label="详细地址" prop="deliveryAddress">
									<el-input v-model="newFormData.deliveryAddress"></el-input>
								</el-form-item>
								<el-form-item label-width="15px">
									<el-button :disabled="clickBtn"  @click="modifyFromSure('modifyForm')" type="primary">确定</el-button>
									<el-button @click="modifyFromCancel">取消</el-button>
								</el-form-item>
							</el-form>
						</div>
					</div>
				</transition>
			</div>
			<!--修改收货地址(form表单)   end-->
			<!--新添收货地址(form表单)   start-->
			<div class="add-new-address">
				<transition name="fade">
					<div class="modal-backdrop" v-show="addNewAddressShow"></div>
				</transition>
				<transition name="slideDown">
					<div class="add-address-con" v-show="addNewAddressShow" :style="{top:top}">
						<div class="add-header-top">
							<span class="add-header-title">新增收货地址</span>
						</div>
						<div class="add-header-body">
							<el-form :model="newFormData" :rules="deliveryrules"  ref="NewForm"  label-width="80px">
								<el-form-item label="客户名称" prop="memberName">
									<el-input v-model="newFormData.memberName" disabled></el-input>
								</el-form-item>
								<el-form-item label="手机" prop="deliveryPhone">
									<el-input v-model="newFormData.deliveryPhone"></el-input>
								</el-form-item>
								<el-form-item label="收货人" prop="deliveryContact">
									<el-input v-model="newFormData.deliveryContact"></el-input>
								</el-form-item>
								<el-form-item label="电话" prop="">
									<el-input v-model="newFormData.deliveryTel"></el-input>
								</el-form-item>
								<el-form-item label="区域" prop="detailedArea">
									<el-cascader style="width: 405px" opper-class="kael" :options="detailedAreaList" v-model="newFormData.detailedArea" :props="areaProps">
									</el-cascader>
								</el-form-item>
								<el-form-item label="详细地址" prop="deliveryAddress">
									<el-input v-model="newFormData.deliveryAddress"></el-input>
								</el-form-item>
								<el-form-item label-width="15px">
									<el-button :disabled="clickBtn" @click="addFormSure('NewForm')" type="primary">确定</el-button>
									<el-button @click="addFormCancel">取消</el-button>
								</el-form-item>
							</el-form>
						</div>
					</div>
				</transition>
			</div>
			<!--新添收货地址(form表单)   end-->
			<!--选择收货地址的弹窗(列表)  start-->
			<div class="modify-address">
				<transition name="fade">
					<div class="modal-backdrop" v-show="modifyAddressListShow"></div>
				</transition>
				<transition name="slideDown">
					<div class="modify-address-con" v-show="modifyAddressListShow" :style="{top:top}">
						<div class="modify-header">
							<span class="modify-header-title">修改收货地址</span>
							<div class="public-left clearfix">
								<div class="goods-input">
									<input type="text" placeholder="请输入收货人姓名或手机" v-model="memberDeliveryQb.fullTextFilterStr" @keydown.enter="modifyAddressListBtn(false)" /><i @click="modifyAddressListBtn(false)"></i>
								</div>
							</div>
							<span class="addNewAddress" @click="addNewAddressBtn"><i class="el-icon-plus"></i>新增地址</span>
						</div>
						<div class="modify-address-body">

							<el-radio-group v-model="zzRadio">
							<ul class="modify-address-ul">
								<li v-for="(item,index) in shItems">
									<div class="modify-address-li-box">
										<el-radio class="radio" v-model="radio" :label="item.deliverySummary+'|'+item.deliveryCode">{{item.deliverySummary}}</el-radio>
										<i class="defaultColor" v-show="item.deliveryDefault=='1'">默认</i>
										<div class="modify-li-R">
											<span v-show="item.deliveryDefault=='0'" @click="setAddressDefaultBtn(item.deliveryCode)"><em class="el-icon-circle-check"></em>设为默认</span>
											<span @click="modifyFormBtn(item.deliveryCode)"><em class="el-icon-edit"></em>修改</span>
											<span @click="delAddressListBtn(item.deliveryCode,item.deliveryDefault,index,item.deliveryContact)"><em class="el-icon-delete"></em>删除</span>
										</div>
									</div>
								</li>
							</ul>
								</el-radio-group>
						</div>
						<div class="modify-btn">
							<el-button :disabled="clickBtn" @click="modifyListSure" type="primary">确定</el-button>
							<el-button @click="modifyListCancel">取消</el-button>
						</div>
					</div>
				</transition>
			</div>
			<!--选择收货地址的弹窗(列表)  end-->
			<!--普通发票（列表）  start-->
			<div class="common-bill">
				<transition name="fade">
					<div class="modal-backdrop" v-show="commonBillListShow"></div>
				</transition>
				<transition name="slideDown">
					<div class="common-bill-con" v-show="commonBillListShow" :style="{top:top}">
						<div class="modify-header">
							<span class="modify-header-title">修改发票信息</span>
							<div class="public-left clearfix">
								<div class="goods-input">
									<input type="text" placeholder="请输入发票抬头/发票内容" v-model="memberInvoiceQb.fullTextFilterStr" @keydown.enter="invoiceListBtn(2,false)" /><i @click="invoiceListBtn(2,false)"></i>
								</div>
							</div>
							<span class="addNewAddress" @click="addCommonBillBtn"><i class="el-icon-plus"></i>新增普通发票</span>
						</div>
						<div class="modify-address-body">
							<el-radio-group v-model="zzRadio">
							<ul class="modify-address-ul">
								<li v-for="(item,index) in shItems">
									<div class="modify-address-li-box">
										<el-radio class="radio" v-model="radio" :label="item.invoiceSummary"></el-radio>
										<i class="defaultColor" v-show="item.invoiceDefault=='1'">默认</i>
										<div class="modify-li-R">
											<span v-show="item.invoiceDefault=='0'" @click="setDefaultInvoiceBtn(item.invoiceCode,item.invoiceType)"><em class="el-icon-circle-check"></em>设为默认</span>
											<span @click="modifyCommonBillListBtn(index)"><em class="el-icon-edit"></em>修改</span>
											<span @click="delInvoiceListBtn(item.invoiceCode,item.invoiceType,item.invoiceDefault,index)"><em class="el-icon-delete"></em>删除</span>
										</div>
									</div>
								</li>
							</ul>
							</el-radio-group>
						</div>
						<div class="modify-btn">
							<el-button @click="sureCommonBillListBtn" type="primary">确定</el-button>
							<el-button @click="cancelCommonBillListBtn">取消</el-button>
						</div>
					</div>
				</transition>
			</div>
			<!--普通发票（列表）  end-->
			<!--新添普通发票(form表单)   start-->
			<div class="add-new-address">
				<transition name="fade">
					<div class="modal-backdrop" v-show="addCommonBillFormShow"></div>
				</transition>
				<transition name="slideDown">
					<div class="add-address-con" v-show="addCommonBillFormShow" :style="{top:top}">
						<div class="add-header-top">
							<span class="add-header-title">新增普通发票</span>
						</div>
						<div class="add-header-body">
							<el-form :model="newFormData" :rules="invoicerules" ref="CommonBillForm" label-width="100px">
								<el-form-item label="发票抬头" prop="invoiceTitle">
									<el-input v-model="newFormData.invoiceTitle"></el-input>
								</el-form-item>
								<el-form-item label="发票内容" prop="invoiceContent">
									<el-input v-model="newFormData.invoiceContent"></el-input>
								</el-form-item>
                <el-form-item style="margin-bottom: 60px" label="纳税人识别号" prop="invoiceTaxId">
                  <el-input v-model="newFormData.invoiceTaxId"></el-input>
                </el-form-item>
								<el-form-item label-width="15px" style="clear: both">
									<el-button :disabled="clickBtn" @click="addCommonBillFormSure('CommonBillForm')" type="primary">确定</el-button>
									<el-button @click="addCommonBillFormCancel">取消</el-button>
								</el-form-item>
							</el-form>
						</div>
					</div>
				</transition>
			</div>
			<!--新添普通发票(form表单)   end-->
			<!--修改普通发票(form表单)   start-->
			<div class="add-new-address">
				<transition name="fade">
					<div class="modal-backdrop" v-show="modifyCommonBillFormShow"></div>
				</transition>
				<transition name="slideDown">
					<div class="add-address-con" v-show="modifyCommonBillFormShow" :style="{top:top}">
						<div class="add-header-top">
							<span class="add-header-title">修改普通发票</span>
						</div>
						<div class="add-header-body">
							<el-form :model="newFormData" :rules="invoicerules" ref="CommonBillForm" label-width="100px">
								<el-form-item label="发票抬头" prop="invoiceTitle">
									<el-input v-model="newFormData.invoiceTitle"></el-input>
								</el-form-item>
								<el-form-item label="发票内容" prop="invoiceContent">
									<el-input v-model="newFormData.invoiceContent"></el-input>
								</el-form-item>
                <el-form-item  style="margin-bottom: 60px"  label="纳税人识别号" prop="invoiceTaxId">
                  <el-input v-model="newFormData.invoiceTaxId"></el-input>
                </el-form-item>
								<el-form-item label-width="15px" style="clear:both;">
									<el-button @click="modifyCommonBillFormSure('CommonBillForm')" type="primary">确定</el-button>
									<el-button @click="modifyCommonBillFormCancel">取消</el-button>
								</el-form-item>
							</el-form>
						</div>
					</div>
				</transition>
			</div>
			<!--修改普通发票(form表单)   end-->

			<!--增值发票（列表）  start-->
			<div class="common-bill">
				<transition name="fade">
					<div class="modal-backdrop" v-show="incrementBillListShow"></div>
				</transition>
				<transition name="slideDown">
					<div class="common-bill-con" v-show="incrementBillListShow"  :style="{top:top}">
						<div class="modify-header">
							<span class="modify-header-title">修改发票信息</span>
							<div class="public-left clearfix">
								<div class="goods-input">
									<input type="text" placeholder="请输入发票抬头/开户银行/开户账号/发票内容" v-model="memberInvoiceQb.fullTextFilterStr" @keydown.enter="invoiceListBtn(3,false)" /><i @click="invoiceListBtn(3,false)"></i>
								</div>
							</div>
							<span class="addNewAddress" @click="addIncrementBillBtn"><i class="el-icon-plus"></i>新增增值发票</span>
						</div>
						<div class="modify-address-body">
								<el-radio-group v-model="zzRadio">
							<ul class="modify-address-ul">
								<li v-for="(item,index) in shItems">
									<div class="modify-address-li-box">
										<el-radio class="radio" :label="item.invoiceSummary"></el-radio>
										<i class="defaultColor" v-show="item.invoiceDefault=='1'">默认</i>
										<div class="modify-li-R">
											<span v-show="item.invoiceDefault=='0'" @click="setDefaultInvoiceBtn(item.invoiceCode,item.invoiceType)"><em class="el-icon-circle-check"></em>设为默认</span>
											<span @click="modifyIncrementBillListBtn(index)"><em class="el-icon-edit"></em>修改</span>
											<span @click="delInvoiceListBtn(item.invoiceCode,item.invoiceType,item.invoiceDefault,index)"><em class="el-icon-delete"></em>删除</span>
										</div>
									</div>
								</li>
							</ul>
								</el-radio-group>
						</div>

						<div class="modify-btn">
							<el-button @click="sureIncrementBillListBtn" type="primary">确定</el-button>
							<el-button @click="cancelIncrementBillListBtn">取消</el-button>
						</div>
					</div>
				</transition>
			</div>
			<!--增值发票（列表）  end-->
			<!--新添增值发票(form表单)   start-->
			<div class="add-new-address">
				<transition name="fade">
					<div class="modal-backdrop" v-show="addIncrementBillFormShow"></div>
				</transition>
				<transition name="slideDown">
					<div class="add-address-con" v-show="addIncrementBillFormShow" :style="{top:top}">
						<div class="add-header-top">
							<span class="add-header-title">新增增值发票</span>
						</div>
						<div class="add-header-body">
							<el-form :model="newFormData" :rules="invoicerules" ref="IncrementBillForm" label-width="100px">
								<el-form-item label="发票抬头" prop="invoiceTitle">
									<el-input v-model="newFormData.invoiceTitle"></el-input>
								</el-form-item>
								<el-form-item label="发票内容" prop="invoiceContent">
									<el-input v-model="newFormData.invoiceContent"></el-input>
								</el-form-item>
								<el-form-item label="开户银行" prop="invoiceBank">
									<el-input v-model="newFormData.invoiceBank"></el-input>
								</el-form-item>
								<el-form-item label="开户账号" prop="invoiceAccount">
									<el-input v-model="newFormData.invoiceAccount"></el-input>
								</el-form-item>
								<el-form-item label="纳税人识别号" prop="invoiceTaxId">
									<el-input v-model="newFormData.invoiceTaxId"></el-input>
								</el-form-item>
								<el-form-item label-width="15px" style="width: 100%">
									<el-button :disabled="clickBtn" @click="addIncrementBillFormSure('IncrementBillForm')" type="primary">确定</el-button>
									<el-button @click="addIncrementBillFormCancel">取消</el-button>
								</el-form-item>
							</el-form>
						</div>
					</div>
				</transition>
			</div>
			<!--新添增值发票(form表单)   end-->
			<!--修改增值发票(form表单)   start-->
			<div class="add-new-address">
				<transition name="fade">
					<div class="modal-backdrop" v-show="modifyIncrementBillFormShow"></div>
				</transition>
				<transition name="slideDown">
					<div class="add-address-con" v-show="modifyIncrementBillFormShow" :style="{top:top}">
						<div class="add-header-top">
							<span class="add-header-title">修改增值发票</span>
						</div>
						<div class="add-header-body">
							<el-form :model="newFormData" :rules="invoicerules" ref="IncrementBillForm" label-width="100px">
								<el-form-item label="发票抬头" prop="invoiceTitle">
									<el-input v-model="newFormData.invoiceTitle"></el-input>
								</el-form-item>
								<el-form-item label="发票内容" prop="invoiceTitle">
									<el-input v-model="newFormData.invoiceContent"></el-input>
								</el-form-item>
								<el-form-item label="开户银行" prop="invoiceBank">
									<el-input v-model="newFormData.invoiceBank"></el-input>
								</el-form-item>
								<el-form-item label="开户账号" prop="invoiceAccount">
									<el-input v-model="newFormData.invoiceAccount"></el-input>
								</el-form-item>
								<el-form-item label="纳税人识别号" prop="invoiceTaxId">
									<el-input v-model="newFormData.invoiceTaxId"></el-input>
								</el-form-item>
								<el-form-item label-width="15px" style="width: 100%">
									<el-button @click="modifyIncrementBillFormSure('IncrementBillForm')" type="primary">确定</el-button>
									<el-button @click="modifyIncrementBillFormCancel">取消</el-button>
								</el-form-item>
							</el-form>
						</div>
					</div>
				</transition>
			</div>
			<!--修改增值发票(form表单)   end-->

			<div class="order-select">
				<em class="iconfont" style="color:#f50;">&#xe708;</em><span>客户</span>
				<div class="order-input">
					<template>
						<el-select v-model="memberCode" clearable filterable placeholder="输入名称" @change="show_defaultAddress">
							<el-option v-for="item in options" :key="item.memberCode" :label="item.memberName" :value="item.memberCode">
							</el-option>
						</el-select>
					</template>
					<!--<em class="iconfont order-input-em2" style="display: none;">&#xe607;</em>-->
				</div>
			</div>
			<div class="order-tab">
				<table class="order-tab1" border="0" cellspacing="0" cellpadding="0" width="100%">
					<col width="4.5%" />
					<col width="4.5%" />
					<col width="8%" />
					<col width="15%" />
					<col width="18%" />
					<col width="10%" />
					<col width="5%" />
					<col width="12%" />
					<col width="12%" />
					<col width="8%" />
					<col width="8%" />
					<col width="8%" />
					<tr class="tab-th">
						<td>序号</td>
						<td>主图</td>
						<td>商品编码</td>
						<td>商品名称</td>
						<td>规格</td>
						<td>数量</td>
						<td>单位</td>
						<td>单价</td>
						<td>小计</td>
						<td>备注</td>
					</tr>
					<tr class="hoverTr" v-for="(item, index) in items">
						<td>
							<span class="order-num">
								{{item.nom}}
							</span>
							<span class="order-add">
								<em class="iconfont" @click="minus(index,item.goodsCode)">&#xe684;</em>
							</span>
						</td>
						<td><img :src="item.goodsBigPic" v-if="item.goodsBigPic!=''"><em class="iconfont" style="color: #aaa;font-size: 30px;" v-else>&#xe714;</em></td>
						<td>{{item.goodsCode}}</td>
						<td>{{item.goodsname}}</td>
						<td>{{item.goodsSkuValue}}</td>
						<td><input class="order-input1" @blur="shuliang(index,item.goodsNum,item.goodsSalePrice,item.goodsCode)" @keyup="sum(index,item.goodsNum,item.goodsSalePrice,item.goodsCode)" v-model="item.goodsNum"></td>
						<td>{{item.goodsNumUnit}}</td>
						<td>{{item.goodsSalePrice}}</td>
						<td>{{item.goodsxiaji}}</td>
						<td class="goodsRemark">
							<template>
								<el-button type="text" @click="addNote(index)">
									<em v-if="item.goodsRemark == '' || item.goodsRemark == null" class="iconfont"  >&#xec52;</em>
									<span v-else><em class="iconfont">&#xe617;</em>{{item.goodsRemark}}</span>
								</el-button>
								<div class="beizhu-box">
									<el-dialog title="添加商品备注" :visible.sync="dialogFormVisible">
									  <el-form :model="form">
									      <el-input  type="textarea" v-model="form.note" auto-complete="off" class="addbeuzhu"  placeholder="备注信息最多不超过250个字"></el-input>
									  </el-form>
									  <div slot="footer" class="dialog-footer">
									  	<el-button type="primary" @click="confirnBtn">确 定</el-button>
									    <el-button @click="cancelBtn">取 消</el-button>
									  </div>
									</el-dialog>
								</div>
							</template>
						</td>
					</tr>
					<tr class="hoverTr addinpt" v-for="(item, index1) in items2">
						<td>
						</td>
						<td colspan="3">
							<template>
								<el-select @change="addGoods" v-model="value2" filterable :disabled="Boolean(disple)" placeholder="输入编码/商品名称" >
									<el-option v-for="item in options2" :key="item.value2" :disabled="item.disabled" :label="item.goodsName + ' ( '+  item.goodsSkuValue + ' )'" :value="item.goodsCode">
									</el-option>
								</el-select>
							</template>
							<em class="iconfont" style="position: absolute;right: 8px;top: 10px;cursor: pointer;display: none;">&#xe607;</em>
						</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
					</tr>
					<tr class="dorder-td hoverTr">
						<td>合计</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td>{{totalnum}}</td>
						<td></td>
						<td></td>
						<td>{{valuesum}}</td>
						<td></td>

					</tr>
					<tr class="dorder-tend">
						<td colspan="10">
							<template>
								<el-checkbox v-model="checked" @change="shenqing">已申请特价，请输入获批订单金额</el-checkbox>
							</template>
							<input style="margin-left: 5px;" :disabled="disad" :class="{activedis:disad}" v-model="specialMoney" @change="sumSpecialMoney" @keyup="vFun_specialMoney"/>
							<!--<p>运费：<span>0.00</span></p>-->
							<p v-if='checked'>应付金额：<span> {{specialMoney}}</span></p>
							<p v-if='!checked'>应付金额：<span> {{valuesum}}</span></p>
						</td>
					</tr>
				</table>
				<p style="color: #f50;float: right;" v-if="tejia">特价不能为空</p>
			</div>
			<div class="order-xinxi" style="margin-top: 40px;">
				<div class="order-deta" style="clear: both;height: 32px;">
				<em class="iconfont" style="color:#f50;position: absolute;left: -20px;top: -8px;">&#xe708;</em><span style="float: left;">收货信息</span>
					<p style="position: relative;top: -5px;left: 13px;" v-if="disple==false">
						<em @click="modifyAddressListBtn(true)" class="iconfont iconClick" style="font-size: 15px;color: #768696;">&#xe77d;</em> 客户名称：
						<span>{{deliveryData.deliveryData.memberName}}</span> 收货人：
						<span>{{deliveryData.deliveryData.deliveryContact}}</span> 联系电话：
						<span>{{deliveryData.deliveryData.deliveryPhone}}</span> 收货地址：
						<span>{{deliveryData.deliveryData.deliveryArea}}{{deliveryData.deliveryData.deliveryAddress}}</span>
					</p>
				</div>
				<div class="order-deta" style="clear: both;">
					<span style="float: left;line-height: 34px;margin-right: 14px;">交货日期</span>
					<template>
						<div class="block">
							<el-date-picker  type="date" placeholder="选择日期" :picker-options="pickerOptions0" v-model="deliveryDate">
							</el-date-picker>
						</div>
					</template>
				</div>
				<div class="order-deta">
					<span style="position: relative;top: -2px;">发票信息</span>
					<template>
						<el-select v-model="valu" @change="fpxinxi" :disabled="Boolean(disple)" placeholder="请选择">
							<el-option v-for="item in options3" :key="item.valu" :label="item.label" :value="item.valu">
							</el-option>
						</el-select>
					</template>
					<div class="putongfp" v-if="putongfp2">
						<em @click="invoiceListBtn(2,2)" class="iconfont iconClick" style="font-size: 15px;color: #768696;">&#xe77d;</em> 发票抬头：{{commonInvoiceArray.commonInvoiceArray.invoiceTitle}}&nbsp;发票内容：{{commonInvoiceArray.commonInvoiceArray.invoiceContent}}
					</div>
					<div class="putongfp" v-if="zengzhifp">
						<em @click="invoiceListBtn(3,3)" class="iconfont iconClick" style="font-size: 15px;color: #768696;">&#xe77d;</em> 发票抬头：{{incrementInvoiceArray.incrementInvoiceArray.invoiceTitle}}&nbsp;发票内容：{{incrementInvoiceArray.incrementInvoiceArray.invoiceContent}}&nbsp;开户银行：{{incrementInvoiceArray.incrementInvoiceArray.invoiceBank}}
						&nbsp;开户账号：{{incrementInvoiceArray.incrementInvoiceArray.invoiceAccount}}&nbsp;纳税人识别号：{{incrementInvoiceArray.incrementInvoiceArray.invoiceTaxId}}
					</div>
				</div>
				<div class="order-deta" style="margin-top: 25px;">
					<em class="iconfont" v-if="disad==false" style="color:#f50;position: absolute;left: -20px;top: -8px;">&#xe708;</em><span>备注说明</span>
					<input type="text" class="order-bzsm" v-model="orderBuyRemark" size="160" />
				</div>
				<div class="order-deta" style="margin-top: 25px;">
					<span>附件信息</span>
                  	<el-upload
                    class="upload-demo"
                    action="/v3/misc/common/uploadFile"
                    :data="vue_upload_uploadData"
                    :on-remove="vFun_upload_remove"
                    :on-success="vFun_upload_success"
                    :on-error="vFun_upload_error"
                    :before-upload="vFun_upload_before">
					<label><em class="iconfont" style="font-size: 14px;">&#xe6c4;</em>添加附件</label> （附件最大20M，支持格式：Word、Excel、Txt、JPG、PNG、BMP、GIF）
					<!--<p><span style="margin-left: 60px;">暂无数据</span></p>-->
					</el-upload>
				</div>
				<div class="queren">
					<el-button @click="save" type='primary' :disabled="clickBtn">保存</el-button>
					<el-button @click="$router.push({path:'/order'})">取消</el-button>
				</div>
			</div>
		</div>
				<!--添加备注-->


			</section>
		</template>

<script>
	import * as companyMsgDatas from "../../.././assets/data/companyMsgData"
	import helpComponents from '../../../components/help/help'
	export default {
		components:{helpComponents},
		data() {
			var validatePass = (rule, value, callback) => {
				var ostr=this.newFormData.deliveryPhone;
		      	var reg=/^(13[0-9]|14[57]|15[012356789]|176|177|18[012356789])\d{8}$/;
				if (reg.test(ostr) != true){
					callback(new Error('正确的手机号'));
				}else{
			          callback();
				}

			};
			var areaRule = (rule, value, callback) => {
				if(!value) {
					return callback(new Error('地区不能为空'));
				}else{
					callback();
				}
			};
			return {
       			clickBtn:false,                 //请求数据后禁用按钮
       			saveDis:0,
		      	vue_upload_uploadData:{  //上传附件时需要一同上传的data
				"moduleName":"Sale",
				"fileName":"",
				"fromCode":"",
				"fromTable":"SaleOrder",
				},
				selectedMemberName:"",
				selectedMemberCode:"",
				helpData:{
					templateName:"",
					templateRemark:"",
					questionAndAnswerArray:[]
				},

					/*--查询条件--*/
				memberDeliveryQb:{
					"fullTextFilterStr":"",  //收货地址查询关键词
				},
					/*--查询条件--*/
				memberInvoiceQb:{
					"fullTextFilterStr":"",  //发票查询关键词
				},
				dialogFormVisible: false,	 //备注弹出层
				form: {
          			note: '',
          		},
				top:0,   								// 弹出层的top值
				tejia:false,
				bzsm:'',								// 备注说明
				addbeizhu:'',							// 添加备注
				remarkIndex:null,						// 备注下标
				Zbeizhu:'',
				disple:true,							// 禁用商品下拉
				//zzRadio:"",							// 选中的增值发票信息
				incrementInvoiceArray:{					// 增值发票信息
					incrementInvoiceArray:{}
				},
				zzRadio:"",								// 选中的信息
				commonInvoiceArray:{					// 普通发票信息
					commonInvoiceArray:{}
				},
				//deliveryArray:{},						// 收货信息
				modifyAddressListShow: false, 			// 收货地址(列表)显示、隐藏
				modifyFromShow: false, 					// 修改收货地址(form表单)显示、隐藏
				addNewAddressShow: false, 				// 新增收货地址(form表单)显示、隐藏
				commonBillListShow: false, 				// 普通发票(列表)显示、隐藏
				addCommonBillFormShow: false, 			// 新增普通发票(form表单)显示、隐藏
				modifyCommonBillFormShow: false, 		// 修改普通发票(form表单)显示、隐藏
				incrementBillListShow: false, 			// 增值发票(列表)显示、隐藏
				addIncrementBillFormShow: false, 		// 新增普通发票(form表单)显示、隐藏
				modifyIncrementBillFormShow: false, 	// 修改普通发票(form表单)显示、隐藏

				fptaitou: '',
				fpmeirong: '',
				detailedAreaList: [],
				areaProps: {
					value: 'treeName',
					children: 'children',
					label: 'treeName'
				},
				newFormData: {},
				//收货表单校验
				deliveryrules: {
					memberName: [{ required: true, message: '客户名称不能为空', trigger: 'blur' },],
					deliveryContact: [{ required: true, message: '收货人不能为空', trigger: 'blur' },],
					deliveryPhone: [
						{ required: true, message: '手机号不能为空', trigger: 'blur' },
						{ validator: validatePass, trigger: 'blur' }
					],
					deliveryAddress: [{ required: true, message: '详细地址不能为空', trigger: 'blur' },],
					detailedArea: [{required: true, validator: areaRule, trigger: 'blur'}],
				},
				//发票表单校验
				invoicerules: {
					invoiceTitle: [{ required: true, message: '发票抬头不能为空', trigger: 'blur' },],
//					invoiceContent: [{ required: true, message: '发票内容不能为空', trigger: 'blur' },],
					invoiceBank: [{ required: true, message: '开户银行不能为空', trigger: 'blur' },],
					invoiceAccount: [{ required: true, message: '开户账号不能为空', trigger: 'blur' },],
					invoiceTaxId: [{ required: true, message: '纳税人识别号不能为空', trigger: 'blur' },
						//{ required: true, min:0,max:10,message: '级别名称不能超过十个字', trigger: 'blur' },
					],
				},
				shItems: [ ],
				radio: '1', 			// 修改收货地址单选框选中
//				invalue: '1', 			// 数量
				valuesum: 0, 			// 合计金额
				totalnum: 0,			// 合计条数
				checked: false,			// 申请特价
				specialMoney:null,		// 特价金额
				disad: true,
				fpneirong: '', 			// 发票内容
				putongfp2: false, 		// 普通发票
				zengzhifp: false, 		// 增值发票
				deliveryData:{			// 收货人信息
					deliveryData:{}
				},
				memberCode:'',			// 买家代码
				memberName:'',			// 买家名称
				orderBuyRemark:'', 		// 买家备注
				invoiceType:0,			// 发票类型
				orderTotalFreight:0,	// 运费
				deliveryDate:null,		// 交货日期
				//选择客户
				options: [],

				//选择商品
				options2: [],
				value: '',
				items: [],
				items2: [
					{nom:'1'},
				],
				//选择商品
				options2: [{
					value2: '选项1',
					label2: '黄金糕'
				}, {
					value2: '选项2',
					label2: '双皮奶'
				}, {
					value2: '选项3',
					label2: '蚵仔煎'
				}, {
					value2: '选项4',
					label2: '龙须面'
				}, {
					value2: '选项5',
					label2: '北京烤鸭'
				}],

				value2: '',
				//日期
				pickerOptions0: {
					disabledDate(time) {
						return time.getTime() < Date.now() - 8.64e7;
					}
				},

				value5: '',
				//发票信息
				options3: [{
					valu: '0',
					label: '不开发票'
				}, {
					valu: '1',
					label: '普通发票'
				}, {
					valu: '2',
					label: '增值税发票'
				}],
				valu: '0',
			}
		},

		methods: {
//-------------------------上传附件   start-------------------------------
    	vFun_upload_remove(file,fileList){
    		//this.urlStr = '';
    		fileList.forEach((item,index,arr)=>{
    			//this.urlStr += item.response+','
    		})
    	},
    	vFun_upload_success(res,file,fileList){
    		//this.urlStr = '';
    		fileList.forEach((item,index,arr)=>{
    			//this.urlStr += item.response+','
    		})
    	},
    	vFun_upload_error(err,file,fileList){
    		console.log(err);
    		console.log(file);
    		console.log(fileList);
    		this.Public.openError(this,'上传失败，请重新上传！')
    	},
    	vFun_upload_before(file){
    		this.vue_upload_uploadData.fileName=file.name; //获取上传时的fileName
    		const typeArr = ['xls','xlsx','doc','docx','png','jpg','jpeg','txt','gif','bmp'];  //定义上传的类型
       		const isLt20M = file.size / 1024 / 1024 <= 20;  //判断文件大小
    		let FileName = file.name.substr(file.name.lastIndexOf('.')+1);  //得到上传的类型

        if (typeArr.indexOf(FileName)===-1) {  //判断类型
        	this.Public.openError(this,"上传附件类型有误!")
        }

        if (!isLt20M) {  //判断大小
        	this.Public.openError(this,"上传附件大小不能超过 20MB!")
        }
        return (typeArr.indexOf(FileName)!==-1) && isLt20M;
    	},

//-------------------------上传附件  end --------------------------------

			vFun_specialMoney(){		//特价提示
				if(this.specialMoney==""){
					this.tejia=true;
				}else{
					this.tejia=false;
				}
			},
			systemTemplateAjax(){
				this.axios({
					method:"GET",
					url:"/v3/system/templates/001000000016"
				}).then((res)=>{
						this.helpData.templateName = res.data.templateName;
						this.helpData.templateRemark = res.data.templateRemark;
						this.helpData.questionAndAnswerArray = res.data.questionAndAnswerArray;
				}).catch((err)=>{
					this.Public.openError(this,err.response.data)
				})
			},
			//------修改增值发票(form表单)  start----------------------
			modifyIncrementBillFormCancel() {
				this.modifyIncrementBillFormShow = false;
			},
		    //修改增值发票信息请求
			modifyIncrementBillFormSure(formName) {
				 this.$refs[formName].validate((valid) => {
				 	if(valid){
		  				this.axios({
		  					method: 'put',
		  					url: "/v3/member/invoices/"+this.newFormData.invoiceCode,
							data:{
								"invoiceCode":this.newFormData.invoiceCode,
								"invoiceType":this.newFormData.invoiceType,
								"invoiceTitle":this.newFormData.invoiceTitle,
								"invoiceContent":this.newFormData.invoiceContent,
								"invoiceBank":this.newFormData.invoiceBank,
								"invoiceAccount":this.newFormData.invoiceAccount,
								"invoiceTaxId":this.newFormData.invoiceTaxId,
							}
						}).then((res) => {
							this.$notify({
					          message: '操作成功！',
					          type: 'success',
					          duration: 3000
				   		    });
					       	this.modifyIncrementBillFormShow = false;
					       	if(res.data.invoiceDefault=='0'){
					       		 	this.invoiceListBtn(3,3);
					        }else{
					        	this.incrementInvoiceArray.incrementInvoiceArray = res.data;
					        }
					        this.$refs.IncrementBillForm.resetFields();
						}).catch((err)=>{
							this.Public.openError(this,err.response.data);
						});
				 	}
				 })
			},

			//-------新增增值发票(form表单)  start---------------------
			addIncrementBillBtn() {
				this.addIncrementBillFormShow = !this.addIncrementBillFormShow;
				this.incrementBillListShow = false;
//				this.$refs[newFormData].resetFields();
				this.newFormData.invoiceTitle='';
				this.newFormData.invoiceContent='商品明细';
				this.newFormData.invoiceBank='';
				this.newFormData.invoiceAccount='';
				this.newFormData.invoiceTaxId='';
			},
			addIncrementBillFormCancel() {
				this.addIncrementBillFormShow = false;
				this.$refs.IncrementBillForm.resetFields();
			},
			addIncrementBillFormSure(formName) {
				 this.$refs[formName].validate((valid) => {
				 	if(valid){
				 		this.clickBtn=!this.clickBtn;
				 		this.axios({
							method: 'post',
							url: "/v3/member/invoices",
							data:{
								"memberCode":this.memberCode,
								"invoiceType":3,
								"invoiceTitle":this.newFormData.invoiceTitle,
								"invoiceContent":this.newFormData.invoiceContent,
								"invoiceBank":this.newFormData.invoiceBank,
								"invoiceAccount":this.newFormData.invoiceAccount,
								"invoiceTaxId":this.newFormData.invoiceTaxId,
							}
						}).then((res) => {
							this.clickBtn=!this.clickBtn;
							this.addIncrementBillFormShow = false;
							this.$notify({
					          message: '操作成功！',
					          type: 'success',
					          duration: 3000
					       });
					        //如果是不是首次新增增值税发票，新增成功后，就跳转到增值税发票列表
					        if(res.data.invoiceDefault=='0'){
					       		 this.invoiceListBtn(3,3);
					        }else{
					        	this.incrementInvoiceArray.incrementInvoiceArray = res.data;
					        }
					       this.$refs.IncrementBillForm.resetFields();
						}).catch((err)=>{
							this.clickBtn=!this.clickBtn;
							this.Public.openError(this,err.response.data);
						});
				 	}
				 })
			},

			//-------发票(列表)   start---------------------------------
			invoiceListBtn(invoiceType,show) {
				this.top = this.$refs.order.scrollTop + "px";
				//是否显示普通发票的默信息
				if(show == 2 ){
					this.commonBillListShow = !this.commonBillListShow;
				}
				//是否显示增值发票的默信息
				if(show == 3 ){
					this.incrementBillListShow = !this.incrementBillListShow;
				}
				this.axios({
					method: 'post',
					url: "/v3/member/invoices/listAll/"+invoiceType,
					data:{
						"fullTextFilterStr":this.memberInvoiceQb.fullTextFilterStr
					},
					params:{
						"memberCode":this.memberCode
					},
				}).then((res) => {
						this.shItems = res.data.list;
				}).catch((err)=>{
					this.Public.openError(this,err.response.data)
				});

			},
			modifyIncrementBillListBtn(index) {
				this.modifyIncrementBillFormShow = !this.modifyIncrementBillFormShow;
				this.incrementBillListShow = false;
				this.newFormData = this.shItems[index];

			},
			cancelIncrementBillListBtn() {
				this.incrementBillListShow = false;
				this.memberInvoiceQb.fullTextFilterStr='';
			},
			setDefaultInvoiceBtn(invoiceCode,invoiceType) {
				this.axios({
					method: 'PATCH',
					url: "/v3/member/invoices/"+invoiceCode+"/makeDefault",
					data:{},
					params:{
						"memberCode":this.memberCode
					},
				}).then((res) => {
					this.axios({
						method: 'post',
						url: "/v3/member/invoices/listAll/"+invoiceType,
						data:{},
						params:{
							"memberCode":this.memberCode
						},
					}).then((res) => {
						this.Public.openSuccess(this,"操作成功！");
						this.shItems = res.data.list;
					}).catch((err)=>{
						this.Public.openError(this,err.response.data);
				   });
				}).catch((err)=>{
				   this.Public.openError(this,err.response.data);
			   });
			},
			sureIncrementBillListBtn() {
				var data = this.zzRadio.split(',');
				this.$set(this.incrementInvoiceArray.incrementInvoiceArray,"invoiceTitle",data[0]);
				this.$set(this.incrementInvoiceArray.incrementInvoiceArray,"invoiceContent",data[1]);
				this.$set(this.incrementInvoiceArray.incrementInvoiceArray,"invoiceBank",data[2]);
				this.$set(this.incrementInvoiceArray.incrementInvoiceArray,"invoiceAccount",data[3]);
				this.$set(this.incrementInvoiceArray.incrementInvoiceArray,"invoiceTaxId",data[4]);
				this.incrementBillListShow = false;
				this.memberInvoiceQb.fullTextFilterStr='';
			},

			delInvoiceListBtn(invoiceCode,invoiceType,invoiceDefault,index) {
				const h = this.$createElement;
				this.$msgbox({
					title: '确认',
					message: h('div', { style: 'padding:20px;' }, [
						h('p', { style: 'text-align: center;font-size: 16px;color: #415161;text-align: center;line-height: 24px;margin-bottom: 8px;' }, '请确定是否删除选择的发票信息？'),
					], ),
					customClass: "surePay clearfixBox",
					cancelButtonClass: 'fr',
					confirmButtonClass: 'fr',
					showCancelButton: true,
					confirmButtonText: '确定',
					cancelButtonText: '取消',
				}).then(action => {
					if(action === 'confirm') {
 					//点击确定的回调
		          this.axios({
	  					method: 'DELETE',
	  					url: '/v3/member/invoices/'+invoiceCode,
	  					params:{
							"memberCode":this.selectedMemberCode
						},
					}).then((res) => {
						this.Public.openSuccess(this,"操作成功！");
						if(invoiceDefault == '1'){
							this.axios({
								method: 'post',
								url: "/v3/member/invoices/listAll/"+invoiceType,
								data:{},
								params:{
									"memberCode":this.memberCode
								},
							}).then((res) => {
								this.shItems = res.data.list;
					        	this.commonInvoiceArray.commonInvoiceArray= "";
					        	this.incrementInvoiceArray.incrementInvoiceArray = "";
							}).catch((err)=>{
								this.Public.openError(this,err.response.data);
						   });
						}else{
							this.shItems.splice(index,1);
						}
					}).catch((err)=>{
						this.Public.openError(this,err.response.data);
				   });
					}
				}).catch((err)=>{
					this.Public.openError(this,err.response.data);
			   });
			},

			//------修改普通发票(form表单)  start----------------------
			modifyCommonBillFormCancel() {
				this.modifyCommonBillFormShow = false;
			},
			//修改普通发票信息请求
			modifyCommonBillFormSure(formName) {
			this.$refs[formName].validate((valid) => {
				if(valid){
					this.axios({
		  					method: 'PUT',
		  					url: '/v3/member/invoices/'+this.newFormData.invoiceCode,
		  					data:{
		  					    "invoiceTaxId":this.newFormData.invoiceTaxId,
                    "invoiceType":this.newFormData.invoiceType,
                    "invoiceTitle":this.newFormData.invoiceTitle,
                    "invoiceContent":this.newFormData.invoiceContent,
							}
						}).then((res) => {
							this.$notify({
					          message: '操作成功！',
					          type: 'success',
					          duration: 3000
				      		});
					      	this.modifyCommonBillFormShow = false;
					      	if(res.data.invoiceDefault == '0'){
				       			this.invoiceListBtn(2,2);
					        }else{
					        	this.commonInvoiceArray.commonInvoiceArray=res.data;
					        }
							this.$refs.CommonBillForm.resetFields();
					   }).catch((err)=>{
							this.Public.openError(this,err.response.data);
					   });
				}
			})

			},

			//-------新增普通发票(form表单)  start---------------------
			addCommonBillBtn() {
				this.addCommonBillFormShow = !this.addCommonBillFormShow;
				this.commonBillListShow = false;
				this.newFormData.invoiceTitle='';
				this.newFormData.invoiceContent='商品明细';

			},
			addCommonBillFormCancel() {
				this.addCommonBillFormShow = false;
				this.$refs.CommonBillForm.resetFields();
			},
			addCommonBillFormSure(formName) {
			  this.$refs[formName].validate((valid) => {
			  	if(valid){
			  		this.clickBtn=!this.clickBtn;
			  		this.axios({
						method: 'post',
						url:"/v3/member/invoices",
						data:{
							"memberCode":this.memberCode,
							"invoiceType":2,
							"invoiceTitle":this.newFormData.invoiceTitle,
							"invoiceContent":this.newFormData.invoiceContent,
              "invoiceTaxId":this.newFormData.invoiceTaxId,
						}
					}).then((res) => {
						this.clickBtn=!this.clickBtn;
						this.addCommonBillFormShow = false;
						this.$notify({
				          message: '操作成功！',
				          type: 'success',
				          duration: 3000
				        });
				        //如果是不是首次新增普通发票，新增成功后，就跳转到普通发票列表
				        if(res.data.invoiceDefault == '0'){
				       		 this.invoiceListBtn(2,2);
				        }else{
				        	this.commonInvoiceArray.commonInvoiceArray=res.data;
				        }
				       this.$refs.CommonBillForm.resetFields();
					}).catch((err)=>{
						this.Public.openError(this,err.response.data)
					});
			  	}
			  })
			},

			//--------普通发票(列表)   start----------------------
			cancelCommonBillListBtn() {
				this.commonBillListShow = false;
				this.memberInvoiceQb.fullTextFilterStr='';
			},

			modifyCommonBillListBtn(index) {
				this.modifyCommonBillFormShow = !this.modifyCommonBillFormShow;
				this.commonBillListShow = false;
				this.newFormData = this.shItems[index];

			},

			sureCommonBillListBtn() {
				var data = this.zzRadio.split(',');
				this.$set(this.commonInvoiceArray.commonInvoiceArray,"invoiceTitle",data[0]);
				this.$set(this.commonInvoiceArray.commonInvoiceArray,"invoiceContent",data[1]);
				this.commonBillListShow = false;
				this.memberInvoiceQb.fullTextFilterStr='';
			},



			//------------新增地址(form表单)  start-------------
			addNewAddressBtn() {
				this.addNewAddressShow = !this.addNewAddressShow;
				this.modifyAddressListShow = false;
				this.newFormData.memberName=this.selectedMemberName;
				this.newFormData.deliveryTel='';
				this.newFormData.deliveryContact='';
				this.newFormData.deliveryPhone='';
				this.detailedAreaList.detailedArea='';
				this.newFormData.deliveryAddress='';

			},
			addFormCancel() {
				this.addNewAddressShow = false;
				this.$refs.NewForm.resetFields();
			},
			addFormSure(formName) {
				 this.$refs[formName].validate((valid) => {
          			if (valid) {
          				this.clickBtn=!this.clickBtn;
						this.axios({
							method: 'POST',
							url: "/v3/member/deliverys",
							params:{
								"deliveryArea":JSON.stringify(this.newFormData.detailedArea)
							},
							data:{
								"memberCode":this.memberCode,
								"deliveryTel":this.newFormData.deliveryTel,
								"deliveryContact":this.newFormData.deliveryContact,
								"deliveryPhone":this.newFormData.deliveryPhone,
								"deliveryAddress":this.newFormData.deliveryAddress
							}
						}).then((res) => {
							this.clickBtn=!this.clickBtn;
							this.Public.openSuccess(this,"操作成功！")
							this.addNewAddressShow = false;
							if(res.data.deliveryDefault == '0'){
					        	this.modifyAddressListBtn(true);
					        }else{
					        	this.deliveryData.deliveryData = res.data;
					        	this.deliveryData.deliveryData.deliveryArea =res.data.deliveryAreaBuffer;
					        }
							this.$refs.NewForm.resetFields();
						}).catch((err)=>{
							this.clickBtn=!this.clickBtn;
							this.Public.openError(this,err.response.data)
							this.addNewAddressShow = false;
							this.$refs.NewForm.resetFields();
						});
					} else {
			            console.log('error submit!!');
			            return false;
			          }
			        });

			},
			//---------修改收货地址的操作(form表单)  start------------
			modifyFormBtn(deliveryCode) {
				this.modifyFromShow = !this.modifyFromShow;
				this.modifyAddressListShow = false;
		      	this.axios({
					method: 'GET',
					url: "/v3/member/deliverys/"+deliveryCode,
					data:{},
				}).then((res) => {
						this.newFormData = res.data;
						this.newFormData.detailedArea = JSON.parse(this.newFormData.deliveryArea);
					}).catch((err)=>{
					    this.Public.openError(this,err.response.data)
				   });
			},
			modifyFromCancel() {
				this.modifyFromShow = !this.modifyFromShow;
				this.$refs.modifyForm.resetFields();
			},

			modifyFromSure(formName) {
				this.$refs[formName].validate((valid) => {
					if(valid){
						this.clickBtn=!this.clickBtn;
						this.axios({
		  					method: 'PUT',
		  					url: '/v3/member/deliverys/'+this.newFormData.deliveryCode,
							params:{
								"deliveryArea":JSON.stringify(this.newFormData.detailedArea)
							},
							data:{
								"memberCode":this.newFormData.memberCode,
								"memberName":this.newFormData.memberName,
								"deliveryTel":this.newFormData.deliveryTel,
								"deliveryContact":this.newFormData.deliveryContact,
								"deliveryPhone":this.newFormData.deliveryPhone,
								"deliveryAddress":this.newFormData.deliveryAddress,
							}
						}).then((res) => {
							if(res.data.deliveryDefault == '0'){
								this.clickBtn=!this.clickBtn;
					        	this.modifyAddressListBtn(true);
					        }else{
					        	this.clickBtn=!this.clickBtn;
					        	this.deliveryData.deliveryData = res.data;
					        	this.deliveryData.deliveryData.deliveryArea =res.data.deliveryAreaBuffer;
					        }
							this.$refs.modifyForm.resetFields();
							this.modifyFromShow = !this.modifyFromShow;
							this.Public.openSuccess(this,"操作成功！")
						}).catch((err)=>{
							this.clickBtn=!this.clickBtn;
							this.Public.openError(this,err.response.data)
						});
					}else{
						return false;
					}
				})
				//修改收货信息请求

			},
			queryMemberDelivery_all(){
				this.axios({
					method: 'POST',
					url: "/v3/member/deliverys/listAll",
					params:{
						'memberCode':this.memberCode
					},
					data:{
						"fullTextFilterStr":this.memberDeliveryQb.fullTextFilterStr
					}
				}).then((res) => {
					this.shItems = res.data.list;
				}).catch((err)=>{
					this.Public.openError(this,err.response.data)
				});
			},
			//-------------修改收货地址(列表)  start---------------
			modifyAddressListBtn(show) {
				this.top = this.$refs.order.scrollTop + "px";
				//是否显示默认的收货地址
				if(show == true){
					this.modifyAddressListShow = !this.modifyAddressListShow;
				};
				this.queryMemberDelivery_all();
			},
			modifyListCancel() {
				this.modifyAddressListShow = false;
				this.memberDeliveryQb.fullTextFilterStr='';
			},
			modifyListSure() {
				var data = this.zzRadio.split('|')[0];
				data = data.split(',');
				this.$set(this.deliveryData.deliveryData,"memberName",data[0]);
				this.$set(this.deliveryData.deliveryData,"deliveryContact",data[1]);
				this.$set(this.deliveryData.deliveryData,"deliveryPhone",data[2]);
				this.$set(this.deliveryData.deliveryData,"deliveryArea",data[3]);
				this.$set(this.deliveryData.deliveryData,"deliveryAddress",data[4]);
				this.deliveryData.deliveryData.deliveryCode = this.zzRadio.split('|')[1];
				this.modifyAddressListShow = false;
				this.memberDeliveryQb.fullTextFilterStr='';
			},

			setAddressDefaultBtn(deliveryCode) {
				this.axios({
					method: 'PATCH',
					url: "/v3/member/deliverys/"+deliveryCode+"/makeDefault",
					data:{},
					params:{
						"memberCode":this.memberCode
					},
				}).then((res) => {
					this.Public.openSuccess(this,"操作成功！");
					this.queryMemberDelivery_all();
				}).catch((err)=>{
					this.Public.openError(this,err.response.data)
				});
			},

			delAddressListBtn(deliveryCode,deliveryDefault,index,deliveryContact) {
				const h = this.$createElement;
				this.$msgbox({
					title: '确认',
					message: h('div', { style: 'padding:20px;' }, [
						h('p', { style: 'text-align: center;font-size: 16px;color: #415161;text-align: center;line-height: 24px;margin-bottom: 8px;' }, '请确定是否删除选择的收货地址？'),
					], ),
					customClass: "surePay clearfixBox",
					cancelButtonClass: 'fr',
					confirmButtonClass: 'fr',
					showCancelButton: true,
					confirmButtonText: '确定',
					cancelButtonText: '取消',
				}).then(action => {
					if(action == 'confirm') {

					//点击确定的回调
		         	this.axios({
	  					method: 'delete',
	  					url: "/v3/member/deliverys/"+deliveryCode,
	  					params:{
							"memberCode":this.selectedMemberCode
						},
					}).then((res) => {
						this.Public.openSuccess(this,"操作成功！");
						if(deliveryDefault == '1'){
							this.queryMemberDelivery_all();
							this.deliveryData.deliveryData = "";
						}else{
							this.shItems.splice(index,1);
						}
					}).catch((err)=>{
					   this.Public.openError(this,err.response.data)
				    });
					}
				}).catch((err)=>{
				   this.Public.openError(this,err.response.data)
			    });
			},

			//----------申请特价  start----------------------
			shenqing() {
				this.disad = !this.disad;
				if(this.disad){
					this.tejia = false
				}else{
					this.tejia = true
				}
				if(this.disad){
					var sumPrice = 0;
					for(var i=0; i<this.items.length;i++ ){
						sumPrice += Number(this.items[i].goodsxiaji);
					}
					this.valuesum = sumPrice.toFixed(2);
					this.specialMoney = null;
				}
			},
			sumSpecialMoney(){
				var sumPrice = this.specialMoney;
				if(isNaN(sumPrice)){
					this.$notify.error({
				          message: '请输入正确的特价金额',
			        });
					return;
				}
				sumPrice = Number(sumPrice).toFixed(2);
				this.specialMoney = sumPrice;
			},

			//-----------添加备注  start----------------------
			addNote(index) {		// 弹窗
				this.form.note = this.items[index].goodsRemark;				// 展示已输入的备注信息
				this.remarkIndex = index;									// 得到弹框所属商品下标
			 	this.dialogFormVisible=true;								// 显示弹出框

		    },
			confirnBtn() {		//确认按钮
				this.dialogFormVisible = false;								// 隐藏弹出框
				this.items[this.remarkIndex].goodsRemark = this.form.note;	// 赋值给指定下标商品备注
				this.form.note = null;										// 赋值完成之后清空弹出框内容
			},
			cancelBtn() {			//取消按钮
				this.dialogFormVisible = false;
			},
			//-----------发票信息的选择  start-------------------
			fpxinxi() {
				if(this.valu == "0") {		 // 不开发票
					this.putongfp2 = false;  // 普通发票
					this.zengzhifp = false   // 增值发票
				}
				if(this.valu == "1") {		 // 普通发票
					this.putongfp2 = true; 	 // 普通发票
					this.zengzhifp = false 	 // 增值发票
					this.commonInvoiceArray.commonInvoiceArray = {};
					this.axios({
						method: 'PATCH',
						url: "/v3/member/invoices/"+2+"/queryDefault",
						data:{},
						params:{
							"memberCode":this.memberCode
						},
					}).then((res) => {
						this.commonInvoiceArray.commonInvoiceArray = res.data;
					}).catch((err)=>{
					   this.Public.openError(this,err.response.data)
				    });
				}
				if(this.valu == "2") {//增值发票
					this.putongfp2 = false; //普通发票
					this.zengzhifp = true   //增值发票
					this.incrementInvoiceArray.incrementInvoiceArray = {};
					this.axios({
						method: 'PATCH',
						url: "/v3/member/invoices/"+3+"/queryDefault",
						data:{},
						params:{
							"memberCode":this.memberCode
						},
					}).then((res) => {
					   this.incrementInvoiceArray.incrementInvoiceArray = res.data;
					}).catch((err)=>{
					   this.Public.openError(this,err.response.data)
				    });
				}
			},
			//-----------加减商品  start-------------------
			plus(index) {
				this.items2.push({nom:this.items2.length+1 });
			},
			// 减商品
			minus(index,goodsCode) {
				this.items.splice(index,1);
				var goodsObject = this.options2.filter((p) => {
    				return p.goodsCode == goodsCode;
				});
				this.$set(goodsObject[0],"disabled",false);			// 取消置灰
				this.Valuesum();
				for(var i=0; i<this.items.length;i++){
					if(i>=index){
						this.items[i].nom = this.items[i].nom -1;	// 数组序号处理
					}
				}
			},
			//-----------小计单笔商品金额  start-------------------
			sum(index,goodsNum,goodsSalePrice,goodsCode){
				var xiaojiPrice = this.items.filter((p) => {
    				return p.goodsCode == goodsCode;
					});
				if(isNaN(goodsNum) || isNaN(goodsSalePrice)){
					this.totalnum = 0;
					this.valuesum = 0;
					xiaojiPrice[0].goodsxiaji = 0;
					return;
				}else{
					xiaojiPrice[0].goodsxiaji = goodsSalePrice * goodsNum;
					xiaojiPrice[0].goodsxiaji = xiaojiPrice[0].goodsxiaji.toFixed(2);
				}
				this.Valuesum();
			},
			//-----------控制数量不能小于0  start-------------------
			shuliang(index){
				if (isNaN(this.items[index].goodsNum)){
					this.$notify.error({
				          message: '请输入数量',
				          duration:3000
					})
				}
				if (this.items[index].goodsNum<=0) {
					this.$notify.error({
				          message: '购买数量不能小于1',
				          duration:3000
					})

				}
			},
			//-----------应付金额金额  start-------------------
			Valuesum(){
				var sumPrice = 0;
				var sumtotal = 0;
				if(this.items.length > 0){
					for(var i=0; i<this.items.length;i++ ){
						sumPrice += Number(this.items[i].goodsxiaji);
						sumtotal += Number(this.items[i].goodsNum);
					}
				}
				this.totalnum = sumtotal;

				this.valuesum = sumPrice.toFixed(2);

			},
			//-----------选择购买商品  start-------------------
			addGoods(goodsCode){
				var goodsObject = this.options2.filter((p) => {
    				return p.goodsCode == goodsCode;
				});
				this.$set(goodsObject[0],"disabled",true);	// 置灰已选择

				if(goodsCode != null && goodsCode != ""){
					this.axios({
						method: 'GET',
						url: "/v3/sale/goodss/"+goodsCode,
					}).then((res) => {
						this.items.push({
							nom:this.items.length+1,
							goodsBigPic:res.data.list[0].goodsBigPic,
							goodsCode:res.data.list[0].goodsCode,
							goodsname:res.data.list[0].goodsName,
							goodsSkuValue:res.data.list[0].goodsSkuValue,
							goodsNum:1,	// 默认购买量为1
							goodsNumUnit:res.data.list[0].goodsNumUnit,
							goodsRemark:res.data.list[0].goodsRemark,
							goodsSalePrice:res.data.list[0].goodsSalePrice.toFixed(2),
							goodsxiaji: res.data.list[0].goodsSalePrice.toFixed(2)
						});

						this.Valuesum();
					}).catch((err)=>{
					   this.Public.openError(this,err.response.data)
				    });
					this.value2='';
				}

			},

			// 选择购买商品
			save(){
				var invoiceTitle = '';		// 发票抬头
				var invoiceContent = '';	// 发票内容
				var invoiceBank = '';		// 开户银行（发票）
				var invoiceAccount = '';	// 银行账号（发票）
				var orderGoodsArray = [];	// 选购商品列表

				if(this.valu == '1'){
					// 普通发票
					invoiceTitle = this.commonInvoiceArray.commonInvoiceArray.invoiceTitle;
					invoiceContent = this.commonInvoiceArray.commonInvoiceArray.invoiceContent;
				}
				if(this.valu == '2'){
					// 增值发票
					invoiceTitle = this.incrementInvoiceArray.incrementInvoiceArray.invoiceTitle;
					invoiceContent = this.incrementInvoiceArray.incrementInvoiceArray.invoiceContent;
					invoiceBank = this.incrementInvoiceArray.incrementInvoiceArray.invoiceBank;
					invoiceAccount = this.incrementInvoiceArray.incrementInvoiceArray.invoiceAccount;
				}
				// 组装购买商品，传入后台保存
				var orderTotalNum = 0; // 订单总数量
				for(var i=0; i<this.items.length;i++){
					orderTotalNum += this.items[i].goodsNum;
					var data = {
						"goodsCode":this.items[i].goodsCode,			// 商品编号
						"goodsOrderNum":this.items[i].goodsNum,			// 购买数量
						"goodsRemark":this.items[i].goodsRemark			// 购买备注
					}
					orderGoodsArray.push(data);
				}
				// 检验数据合法性
				if(this.checkMsg()){
					return;
				}

				var orderTotalMoney = this.valuesum;	// 正常价
				if(this.checked){	// 特价处理
					orderTotalMoney = this.specialMoney;
				}
				this.clickBtn=!this.clickBtn;
					this.axios({
						method: 'post',
						url: "/v3/sale/orders",
						data: {
							"orderTotalMoney":orderTotalMoney,				// 订单金额
							"orderUnpaidMoney":orderTotalMoney,				// 待支付金额 = 订单金额（或者特价金额）
							"memberBcode":this.memberCode,					// 买家代码
							"orderBuyRemark":this.orderBuyRemark,			// 买家备注
							"invoiceType":this.invoiceType,					// 发票类型
							"orderTotalFreight":this.orderTotalFreight,		// 运费
							"deliveryDate":this.deliveryDate,				// 交货日期
							"deliveryCode":this.deliveryData.deliveryData.deliveryCode,	// 交货地址代码
							"orderApplySpecial":this.checked?1:0,			// 是否特价
							"orderSpecialMoney":orderTotalMoney,			// 特价金额
							"invoiceTitle":invoiceTitle,					// 发票抬头
							"invoiceContent":invoiceContent,				// 发票内容
							"invoiceBank":invoiceBank,						// 发票开户银行
							"invoiceAccount":invoiceAccount,				// 发票开户账号
							"orderCode":this.vue_upload_uploadData.fromCode,//订单号
							// 收货地址
							"deliverySummary":this.deliveryData.deliveryData.deliveryContact+this.deliveryData.deliveryData.deliveryArea+this.deliveryData.deliveryData.deliveryAddress,
							"orderGoodsStr":JSON.stringify(orderGoodsArray)
						},

					}).then((res) => {
						this.clickBtn=!this.clickBtn;
						this.$notify({
				         	message: '操作成功！',
				         	type: 'success'
				        });
						window.history.go(-1);
					}).catch((err)=>{
					   this.Public.openError(this,err.response.data);
					   this.clickBtn=!this.clickBtn;
				    });
				this.value2=''
			},

			checkMsg(){
				if(this.deliveryData.deliveryData == null ){
						this.$notify.error({
				          message: '请先设置收货人信息',
				        })
						return true;
				};
				if(this.deliveryData.deliveryData.memberName==""){
						this.$notify.error({
				          message: '请填写收货人姓名',
				        })
						return true;
				};
				if(this.deliveryData.deliveryAddress == ""){
						this.$notify.error({
				          message: '请填写收货人地址',
				        })
						return true;
				};
				if(this.deliveryData.deliveryArea == ""){
						this.$notify.error({
				          message: '请设置收货人所在省市',
				        })
						return true;
				};
				if(this.deliveryData.deliveryPhone == "" ){
						this.$notify.error({
				          message: '请设置收货人联系方式',
				        })
						return true;
				};
				if(this.memberCode=='' ){
						this.$notify.error({
				          message: '买家未选择',
				        })
						return true;
				};
				if (this.disad==false) {
					if (this.orderBuyRemark =='') {
						this.$notify.error({
				          message: '备注未填写',
				        })
						return true;
					}
				};
				return false;
			},
			// 展示默认收货地址信息
			show_defaultAddress(val){
				this.options.forEach((item,index,arr)=>{
					if(val==item.memberCode){
						this.selectedMemberName=item.memberName;
						this.selectedMemberCode=item.memberCode;
					}
				})
				this.deliveryData.deliveryData={};
				if(this.items.length > 0){
					this.$confirm('更换客户后,选购列表将会被清除!', '确认', {
				        confirmButtonText: '确定',
				        cancelButtonText: '取消',
				        cancelButtonClass:"fr",
				        confirmButtonClass:"fr",
				        customClass:"clearfixBox"
					}).then(() => {
						this.disple=false;
						this.axios({
							method: 'PATCH',
							url: "/v3/basic/members/queryDefaultDelivery",
							data:{},
							params:{
								"memberCode":this.memberCode
							},
						}).then((res) => {
							this.deliveryData.deliveryData = res.data;
							this.items=[];
							this.disad = true;
							this.checked = false;
							this.valuesum = 0;
							this.specialMoney = null;

						}).catch((err)=>{
							this.$set(this.deliveryData.deliveryData,"memberName","");
							this.$set(this.deliveryData.deliveryData,"deliveryContact","");
							this.$set(this.deliveryData.deliveryData,"deliveryPhone","");
							this.$set(this.deliveryData.deliveryData,"deliveryArea","");
							this.$set(this.deliveryData.deliveryData,"deliveryAddress","");
							this.Public.openError(this,err.response.data);
						});
						for(var i=0; i<this.options2.length; i++){
								this.$set(this.options2[i],"disabled",false);	// 取消置灰
							}
					});
				}else{
					this.disple=false;
					this.axios({
						method: 'PATCH',
						url: "/v3/basic/members/queryDefaultDelivery",
						data:{},
						params:{
							"memberCode":this.memberCode
						},
					}).then((res) => {
						this.deliveryData.deliveryData = res.data;
					}).catch((err)=>{
						this.$set(this.deliveryData.deliveryData,"memberName","");
						this.$set(this.deliveryData.deliveryData,"deliveryContact","");
						this.$set(this.deliveryData.deliveryData,"deliveryPhone","");
						this.$set(this.deliveryData.deliveryData,"deliveryArea","");
						this.$set(this.deliveryData.deliveryData,"deliveryAddress","");
						this.Public.openError(this,err.response.data);
					});
				}

			},
			//请求商品列表////////////////////
			query_saleGoodsAll(){
				this.axios({
					method: 'post',
					url: "/v3/sale/goodss/listAll",
					data: {
						"dataBillstate":"6"
					}
				}).then((res) => {
					this.options2 = res.data.list;
				}).catch((err)=>{
					this.Public.openError(this,err.response.data)
				});
			},
//----------------------查询订单code ------------------------------------
			getMaxBillNum(){
			  this.axios({
	        method: "get",
	        url: "/v3/misc/common/getMaxBillNum",
	        params:{
	        	"columnName":"orderCode",
	        	"billtypeCode":"SaleOrder001",
	        },
	        data: {

	        }
	      }).then((res) => {
	      	console.log(res.data)
	      	this.vue_upload_uploadData.fromCode=res.data;
	      }).catch((err)=>{
			      this.Public.openError(this,err.response.data)
		    });
			},
	},

		mounted() {
			this.getMaxBillNum();
			//------------获取窗口高度   start-------------
			var winHieg = document.documentElement.clientHeight;
			var cont = document.getElementById("order");
			cont.style.height = winHieg - 115 + "px";
			// 请求客户列表
			this.axios({
				method: 'post',
				url: "/v3/basic/members/queryOrderMemberAll",
				data: {}
			}).then((res) => {
				this.options = res.data.list;
			}).catch((err)=>{
				this.Public.openError(this,err.response.data)
			});

			// 请求商品列表
			this.axios({
				method: 'post',
				url: "/v3/sale/goodss/listAll",
				data: {
					"dataBillstate":"6"
				}
			}).then((res) => {
				this.options2 = res.data.list;
			}).catch((err)=>{
				this.Public.openError(this,err.response.data)
			});
		},

		created() {
			//------------请求地区    start-------------
			this.detailedAreaList = companyMsgDatas.areaData;
				//帮助功能
			this.systemTemplateAjax();
		},
	}
</script>

<style scoped>


  .queren{
    position: fixed;
    bottom: 0px;
    margin-left: -15px;
    width: 87%;
    background: #fff;
    height: 80px;
    z-index: 10;
  }

  .queren a {
    display: inline-block;
    height: 32px;
    line-height: 32px;
    background: #fff !important;
    border: 1px solid #cdd9e6;
    color: #666 !important;
    width: 80px;
    border-radius: 20px;
    text-align: center;
    margin-top: 20px;
  }

	.orderOverflow {
		overflow: hidden !important;
	}
	.defaultColor {
		background: #ffc149;
		color: #fff;
		font-size: 12px;
		line-height: 1;
		display: inline;
		padding: 1px 3px;
		margin-right: 2px;
		cursor: pointer;
	}

	.add-header-title {
		font-size: 16px;
		border: 0;
		color: #415161;
		display: block;
		width: 100%;
		margin-bottom: 20px;
	}

	.el-form-item {
		width: 485px;
		float: left;
		margin-right: 10px;
	}

	.modify-li-R span:hover em {
		color: #13c19f;
	}

	.modify-li-R span:hover {
		color: #13c19f;
	}

	.modify-li-R span em {
		color: #768696;
		margin-right: 4px;
	}

	.modify-li-R span {
		padding: 0 12px;
		text-align: center;
		min-width: 60px;
		height: 34px;
		color: #768696;
		cursor: pointer;
	}

	.modify-li-R {
		float: right;
		display: none;
	}

	.modify-address-li-box {
		width: 100%;
	}

	.addresss-list-body li:first-child {
		margin-top: 10px;
	}

	.modify-address-ul li:hover {
		box-shadow: 0 1px 20px rgba(0, 0, 0, .2);
	}

	.modify-address-ul li:hover .modify-li-R {
		display: block;
	}

	.modify-address-ul li {
		padding: 0 30px;
		cursor: pointer;
		line-height: 34px;
	}

	.modify-address-ul {
		max-height: 400px;
		overflow: auto;
		padding: 10px 0px;
	}

	.modify-address-body {
		margin: 10px 0px;
	}

	/* start 增值税发票radio组group的样式*/
	.modify-address-body .el-radio-group{
		display: inline;
		font-size: 12px;
		line-height: initial;
	}
	/* end 增值税发票radio组group的样式*/
	.addNewAddress:hover {
		cursor: pointer;
		color: #13c19f;
	}

	.addNewAddress:hover i {
		cursor: pointer;
		color: #13c19f;
	}

	.addNewAddress {
		float: left;
		margin-left: 22px;
	}

	.addNewAddress i {
		margin: 0 5px;
		color: #768696;
		display: inline-block;
		margin-top: -3px;
		vertical-align: middle;
	}

	.modify-btn {
		padding: 10px 30px 0px 30px;
	}

	.modify-header-title {
		float: left;
		font-size: 18px;
		padding: 0px 30px;
	}

	.public-left {
		float: left;
	}

	.public-left:hover span {
		color: #13C19F;
	}

	.public-left a,
	.public-left span.search-openBtn {
		display: block;
		float: left;
		margin-right: 10px;
		padding-right: 0px;
		position: relative;
		height: 36px;
		line-height: 36px;
		z-index: 100;
		cursor: pointer;
	}

	.goods-input input {
		display: block;
		float: left;
		width: 290px;
		height: 34px;
		font-size: 12px;
		border: 0;
		margin-left: 20px;
	}

	.goods-input {
		float: left;
		width: 340px;
		border: 1px solid #cdd9e6;
		border-radius: 4px;
		margin-right: 10px;
		cursor: pointer;
		margin-left: 10px;
	}

	.goods-input:hover {
		border-color: #13C19F;
		transition: 1s;
	}

	.goods-input i {
		background: url(../../../img/sousuo.png) no-repeat;
		height: 20px;
		width: 20px;
		display: inline-block;
		position: relative;
		top: 5px;
		right: 5px;
		cursor: pointer;
	}

	.modify-header {
		height: 36px;
		line-height: 34px;
	}

	.add-address-con {
		background: #fff;
		min-height: 120px;
		padding: 20px 30px;
		position: absolute;
		width: 100%;
		top: 0;
		left: 0;
		z-index: 1005;
		box-sizing: border-box;
		box-shadow: 0 0 10px #ccc;
		overflow: hidden;
	}

	.modify-address-con,
	.common-bill-con {
		background: #fff;
		min-height: 100px;
		padding: 20px 0px;
		position: absolute;
		width: 100%;
		top: 0;
		left: 0;
		z-index: 1005;
		box-sizing: border-box;
		box-shadow: 0 0 10px #ccc;
		overflow: hidden;
	}

	.modal-backdrop {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 80;
		background-color: rgba(240, 240, 240, 0.2);
	}

	.fade-enter-active,
	.fade-leave-active {
		transition: .4s;
	}

	.fade-enter,
	.fade-leave-active {
		opacity: 0;
	}

	.slideDown-enter-active,
	.slideDown-leave-active {
		transition: .4s;
	}

	.slideDown-enter,
	.slideDown-leave-active {
		height: 0;
		opacity: 0;
	}

	.location {
		padding: 3px 0 15px 0;
	}

	.order {
		background: #fff;
		padding: 15px;
		overflow-y: auto;
		font-family: "微软雅黑";
		position: relative;
	}



	.order-tab {
		margin-top: 15px;
		border-left: 1px solid #e7e9f1;
	}


	.order-tab1 .tab-th td {
		background: #eff1f8;
		padding: 14px 0;
	}


	.dorder-tend td {
		padding: 12px 15px;
		text-align: right;
	}

	.dorder-tend input {
		height: 34px;
		width: 100px;
		border: 1px solid #cdd9e6;
		border-radius: 4px;
		text-indent: 5px;
	}

	.activedis {
		background: #eff1f8;
		cursor: no-drop;
	}
	.hoverTr td{
		height: 54px;
	}
	.hoverTr:hover {
		background: #eff4f9;
	}

	.hoverTr:hover .el-input__inner {
		background: #eff4f9!important;
	}

	.order-add {
		display: none;
	}

	.order-add em {
		cursor: pointer;
	}

	.hoverTr:hover .order-num {
		display: none;
	}

	.hoverTr:hover .order-add {
		display: inline-block;
	}

	.dorder-tend p span {
		display: inline-block;
		width: 128px;
	}

	.dorder-tend p:last-child span {
		color: #f33333;
		font-size: 20px;
	}

	.dorder-tend p {
		margin-top: 12px;
	}

	.order-xinxi {
		margin: 20px;
	}

	.order-deta {
		position: relative;
		margin-top: 15px;
	}

	.order-deta span {
		margin-right: 10px;
	}

	.order-deta a {
		display: inline-block;
		width: 80px;
		height: 30px;
		text-align: center;
		line-height: 31px;
		border-radius: 20px;
		border: 1px solid #cdd9e6;
		margin-top: 30px;
		cursor: pointer;
	}

	.order-deta a:first-child {
		background: rgb(19, 193, 159);
		color: #fff;
		border: 0;
		height: 32px;
		line-height: 32px;
	}

	.putongfp {
		margin-left: 62px;
	}

	.bzstyle {
		border: 1px solid #cdd9e6;
		width: 375px;
		height: 150px;
		margin: 0 auto;
		border-radius: 3px;
	}


	.order {
		background: #fff;
		padding: 15px;
		overflow-y: auto;
		font-family: "微软雅黑";
		position: relative;
	}

	.order-input {
		border: 1px solid #cdd9e6;
		display: inline-block;
		border-radius: 4px;
		box-sizing: border-box;
		height: 34px;
		position: relative;
		top: 2px
	}

	.order-input-em2 {
		position: relative;
		right: 5px;
		top: 0px;
		cursor: pointer;
	}


	.order-tab1 td {
		text-align: center;
		padding: 0px 0;
		border: 1px solid #e7e9f1;
		border-top: 0;
		border-left: 0;
		position: relative;
	}

	.order-tab1 td img {
		width: 45px;
		margin: 0 auto;
	}


	.order-tab1 .order-input1 {
		height: 34px;
		width: 100px;
		border: 1px solid #cdd9e6;
		border-radius: 4px;
		text-align: center;
	}

	.dorder-td td {
		padding: 0px 0;
	}

	.dorder-tend td {
		padding: 12px 15px;
		text-align: right;
	}

	.dorder-tend input {
		height: 34px;
		width: 100px;
		border: 1px solid #cdd9e6;
		border-radius: 4px;
		text-indent: 5px;
	}



	.dorder-tend p span {
		display: inline-block;
		width: 128px;
	}

	.dorder-tend p:last-child span {
		color: #f33333;
		font-size: 20px;
	}

	.dorder-tend p {
		margin-top: 12px;
	}

	.order-xinxi {
		margin: 20px;
	}

	.order-deta {
		position: relative;
		margin-top: 15px;
	}

	.order-deta span {
		margin-right: 10px;
	}

	.order-deta a {
		display: inline-block;
		width: 80px;
		height: 30px;
		text-align: center;
		line-height: 31px;
		border-radius: 20px;
		border: 1px solid #cdd9e6;
		margin-top: 30px;
	}

	.order-deta a:first-child {
		background: rgb(19, 193, 159);
		color: #fff;
		border: 0;
		height: 32px;
		line-height: 32px;
	}

	.putongfp {
		margin-left: 62px;
	}

	.bzstyle {
		border: 1px solid #cdd9e6;
		width: 375px;
		height: 150px;
		margin: 0 auto;
		border-radius: 3px;
	}

	.iconClick:hover {
		color: #13c19f !important;
		cursor: pointer;
	}
	.order-bzsm{
		border: 1px solid #cdd9e6;box-sizing: border-box;border-top: 0;border-left:0 ;border-right:0 ;border-radius:4px ;
	}
	.addinpt .el-input__inner {
		background: #eff4f9!important;
	}

	.goodsRemark button{
		width: 80%;
		margin: 0 auto;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
</style>
